//
//  PostsViewController.h
//  ViewPoint
//
//  Created by Demiao Lin on 10/20/08.
//  Copyright 2008 Tsinghua. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kTitleTag		1
#define kAuthorTag		2
#define kDateTag		3

#define kPageTag		4
#define kPrePageTag		5
#define kNextPageTag	6

#define kHeaderViewTag	7
#define kFooterViewTag	8

@class ThreadViewController;
@class PostViewController;
@class Board;

@interface PostsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>{
	PostViewController *postViewController;
    ThreadViewController *threadViewController;
	NSMutableArray *posts;
	Board *board;
    NSInteger page_num;
	UITableView *tableView;
	
	CFAbsoluteTime lastUpdateTime;
}

@property(nonatomic, retain) PostViewController *postViewController;
@property(nonatomic, retain) ThreadViewController *threadViewController;
@property(nonatomic, retain) NSMutableArray *posts;
@property (nonatomic, retain) Board *board;
@property (nonatomic) NSInteger page_num;
@property(nonatomic, retain) UITableView *tableView;

- (id) initWithTitle:(NSString*) title
			   board:(Board*) b;

- (void) setTitle:(NSString*) view_title 
			board:(Board*) b;

-(void) loadTableView;
-(void) loadTableViewData:(id)object;

- (void) setViewsRotation;
- (void) loadToolbar;

-(void) loadPreviousPage:(id)sender;
-(void) loadNextPage:(id)sender;

@end
